package com.room.mapper;

import com.room.pojo.Teachaer;
import com.room.pojo.vo.TeacherVO;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface TeachaerMapper {

    int deleteTeaById(@Param("ids")String[] ids);

    int deleteByPrimaryKey(Integer teacherId);

    int insert(Teachaer record);

    int insertSelective(Teachaer record);

    Teachaer selectByPrimaryKey(Integer teacherId);

    int updateByPrimaryKeySelective(Teachaer record);

    int updateByPrimaryKey(Teachaer record);

    List<Teachaer> getTeaByPage(@Param("start")Integer start, @Param("size")Integer size);

    @Select("select count(*) from teacher")
    long getTotal();

    //获取最大学号
    public String getMaxId();

    //获取教师的下拉菜单数据
    @Select("select teacher_name as teacherName , phone as phone from teacher")
   List<TeacherVO> getTeacherInit();

    @Select("select phone as phone from teacher where teacher_name = #{name}")
    String getPhoneFormName(String name);
}